import {get,post} from './http.js'

//注册
export const reqregister = params => post("/api/register",params);

//登录
export const reqlogin = params => post("/api/login",params);

//首页----------------------

//首页分类  
export const reqcate = () => get("/api/getcate");

//首页轮播
export const reqbanner = () => get("/api/getbanner");

//首页商品
export const reqgoods = () => get("/api/getindexgoods")

//某个商品详情
export const reqgoodsinfo = params => get("/api/getgoodsinfo",params)


//分类------------------------------

export const reqgood = params => get("/api/getgoods",params)


//购物车---------------------------------

//购物车列表
export const reqcartlist = params => get("/api/cartlist",params)

//购物车删除
export const reqcartdelete = params => post("/api/cartdelete",params)

//购物车添加
export const reqcartadd = params => post("/api/cartadd",params)

//购物车修改
export const reqcartedit = params => post("/api/cartedit",params)



//优惠券
export const reqcoupon = () => get("/api/getcoupon")

